MODULE global
USE param
USE derived
! System time
INTEGER*4 today(3),now(3)
REAL :: sys_etime,sys_time(2)
! Name of file
CHARACTER(LEN=len_fn) :: ipfn
CHARACTER(LEN=len_fn) :: xmfn
CHARACTER(LEN=len_fn) :: lgfn
! String buffer
CHARACTER(LEN=len_linebuf) :: eatline
CHARACTER(LEN=len_linebuf) :: comment_line
CHARACTER(LEN=len_wordbuf),DIMENSION(mn_word) :: eatword
! lattice_structure (BCC/FCC)
INTEGER :: ltype
! lattice parameters (nm)
REAL(DBL) :: dist_a0_nm,dist_a0_ang
! Number of layer to remove
INTEGER :: n_rlayer,n_alayer
INTEGER,POINTER,DIMENSION(:) :: remove_layer1
INTEGER,POINTER,DIMENSION(:) :: remove_layer2
! File info of lammps
INTEGER :: n_lammps_file
TYPE(lammps_file_info),POINTER,DIMENSION(:) :: lammps_file
! Dummy lines
INTEGER :: dummy_line1,dummy_line2
! Number of atoms in lammps file
INTEGER :: n_atom
! Number of lattice in a side
INTEGER :: nside_int
REAL(DBL) :: nside_real,box_width
! Lattice param
INTEGER :: nbasis
REAL(DBL),POINTER,DIMENSION(:,:) :: basis
! Atom and lattice info
INTEGER :: n_lattice,n_neighbor
TYPE(lattice_site_info),POINTER,DIMENSION(:) :: lattice
TYPE(atom_info),POINTER,DIMENSION(:) :: atom
! Cell box map
INTEGER :: n_cell
INTEGER,POINTER,DIMENSION(:,:,:) :: cell_box_map
TYPE(cell_box_info),POINTER,DIMENSION(:) :: cell_box
INTEGER :: n_cell_plane
! nm->A
REAL(DBL) :: unit_conv
! to save positions of xmakemol boundary points
INTEGER :: n_xml_corner
REAL(DBL),DIMENSION(2) :: corner
TYPE(atom_info),DIMENSION(8) :: xml_corner
! Energy of pka
REAL(DBL) :: pkae
! A to nm
REAL(DBL) :: aton
! local neighbor lattice info
type(neighbor_lattice_info),pointer,dimension(:) :: neighbor_lattice
END MODULE global
